//
//  ActView.m
//  fupengdouban
//
//  Created by lanou3g on 15/10/25.
//  Copyright © 2015年 fuoeng. All rights reserved.
//

#import "ActView.h"

@implementation ActView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self p_setupViews];
    }
    return self;
}


-(void)p_setupViews
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.scrllView = [[UIScrollView alloc] initWithFrame:self.bounds];
    [self addSubview:self.scrllView];
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(17, 15, 365, 40)];
    self.titleLabel.font = [UIFont systemFontOfSize:20];
    [self.scrllView addSubview:self.titleLabel];
    
    self.image = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.titleLabel.frame), CGRectGetMaxY(self.titleLabel.frame)+20, 110, 180)];
    self.image.layer.masksToBounds = YES;
    self.image.layer.cornerRadius = 5;
    [self.scrllView addSubview:self.image];
    
    self.beginEndTimeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.image.frame)+5, CGRectGetMinY(self.image.frame), 20, 20)];
    self.beginEndTimeImageView.image = [UIImage imageNamed:@"第一页-跳转后-时间图"];
    [self.scrllView addSubview:self.beginEndTimeImageView];
    
    self.beginEndTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.beginEndTimeImageView.frame)+5, CGRectGetMinY(self.beginEndTimeImageView.frame), 190, 20)];
    self.beginEndTimeLabel.font = [UIFont systemFontOfSize:15];
    [self.scrllView addSubview:self.beginEndTimeLabel];
    
    self.nameImageView = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.beginEndTimeImageView.frame), CGRectGetMaxY(self.beginEndTimeImageView.frame)+10, 20, 20)];
    self.nameImageView.image = [UIImage imageNamed:@"第一页-跳转后-主办方图"];
    [self.scrllView addSubview:self.nameImageView];
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.beginEndTimeLabel.frame), CGRectGetMinY(self.nameImageView.frame), 100, 20)];
    self.nameLabel.font = [UIFont systemFontOfSize:15];
    [self.scrllView addSubview:self.nameLabel];
    
    
    self.categoryNameImageView = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.nameImageView.frame), CGRectGetMaxY(self.nameImageView.frame)+10, 20, 20)];
    self.categoryNameImageView.image = [UIImage imageNamed:@"第一页-跳转后-类型图"];
    [self.scrllView addSubview:self.categoryNameImageView];
    
    self.categoryNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.nameLabel.frame), CGRectGetMinY(self.categoryNameImageView.frame), 100, 20)];
    self.categoryNameLabel.font = [UIFont systemFontOfSize:15];
    [self.scrllView addSubview:self.categoryNameLabel];
    
    
    self.addressImageView = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMinX(self.categoryNameImageView.frame), CGRectGetMaxY(self.categoryNameImageView.frame)+10, 20, 20)];
    self.addressImageView.image = [UIImage imageNamed:@"第一页-跳转后-位置图"];
    [self.scrllView addSubview:self.addressImageView];
    
    self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.categoryNameLabel.frame), CGRectGetMinY(self.addressImageView.frame), 190, 40)];
    self.addressLabel.numberOfLines = 0;
    self.addressLabel.font = [UIFont systemFontOfSize:15];
    [self.scrllView addSubview:self.addressLabel];
    
    self.ActLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.image.frame), CGRectGetMaxY(self.image.frame)+15, 200, 30)];
    self.ActLabel.font = [UIFont systemFontOfSize:20];
    [self.scrllView addSubview:self.ActLabel];
    
    self.ActTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.ActLabel.frame), CGRectGetMaxY(self.ActLabel.frame)+10, 365, 10)];
    self.ActTextLabel.font = [UIFont systemFontOfSize:15];
    self.ActTextLabel.numberOfLines = 0;
    [self.scrllView addSubview:self.ActTextLabel];
    
    
    
    
    
    
    
    
    
    
}


@end
